package com.codedancer.campus.client.async;

import com.codedancer.campus.mapper.ChatMessageMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 聊天信息异步任务
 */
@Component
public class ChatMessageAsync {

    @Autowired
    private ChatMessageMapper chatMessageMapper;

    /**
     * 将用户收到的消息全部设置为已读
     *
     * @param currentUserUuid
     */
    public void setMessageReaded(String currentUserUuid,String receiveUserUuid) {
        chatMessageMapper.setMessageReaded(currentUserUuid,receiveUserUuid);
    }
}
